<!-- 发起询价Begin-->
<div #modal class="modal fade" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-width-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true" (click)="closeModal()">×</span></button>
                <h4 class="modal-title" *ngIf="modalType==='1'">发起询价</h4>
                <h4 class="modal-title" *ngIf="modalType==='2'">查看申购明细</h4>
            </div>
            <div class="modal-body">
                <form class="form-inline">
                    <div class="form-group ext-from-item">
                        <label for="vcNewstockId" class="col-sm-1">证券代码：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="vcNewstockId" name="vcNewstockId" placeholder="证券代码" [(ngModel)]="newStockModel.vcNewstockId" readonly>
                        </div>
                        <label for="stockName" class="col-sm-1">证券名称：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="stockName" name="stockName" placeholder="证券名称" [(ngModel)]="newStockModel.vcNewstockName" readonly>
                        </div>
                        <label for="enIssuePrice" class="col-sm-1">发行价格(元)：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="enIssuePrice" name="enIssuePrice" placeholder="发行价格" [(ngModel)]="newStockModel.enIssuePrice" readonly>
                        </div>
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="lIpoStock" class="col-sm-1">发行数量(万股)：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="lIpoStock" name="lIpoStock" placeholder="发行数量" [(ngModel)]="newStockModel.lIpoStock" readonly>
                        </div>
                        <label class="col-sm-1">缴款时间：</label>
                        <div class="col-sm-3">
                            <div class="input-group date" style="width:100%;">
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                <input type="text" class="form-control datepicker-plugin" id="lJkDate" name="ljkDate" data-settlement-order-id="" [(ngModel)]="newStockModel.ljkDate">
                            </div>
                        </div>
                        <label for="vcMarket" class="col-sm-1">交易所：</label>
                        <div class="col-sm-3">
                            <select class="form-control" name="vcMarket" disabled [(ngModel)]="newStockModel.vcMarket" placeholder="交易所">
                                <option value="">全部</option>
                                <option value="1">上海</option>
                                <option value="2">深圳</option>
                            </select>
                        </div>
                    </div> 
                    <div class="form-group ext-from-item">
                        <label for="enInquiryPrice" class="col-sm-1">询价价格(元)：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="enInquiryPrice" name="enInquiryPrice" placeholder="询价价格" [(ngModel)]="newStockModel.enInquiryPrice">
                        </div>
                        <label for="enIssuesStock" class="col-sm-1">预计中签率(%)：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="enPredictRate" name="enIssueRatio" placeholder="预计中签率(%)" [(ngModel)]="newStockModel.enPredictRate">
                        </div>
                        <label for="sponsor" class="col-sm-1">保荐人(主承销商)：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="sponsor" name="sponsor" placeholder="保荐人（主承销商）" [(ngModel)]="newStockModel.vcLeadUnderwriter" readonly>  
                        </div>
                    </div>
                </form>
                <div class="btnRow">
                    <button *ngIf="newStockModel.lNewstockNo != null && modalType==='1'" type="submit" class="btn btn-primary" (click)="submitNewStock()">提交证劵信息</button>
                    <button *ngIf="newStockModel.lNewstockNo != null && modalType==='1'" type="submit" class="btn btn-primary" (click)="updateNewStock()">更新证劵信息</button>
                </div>
                <div class="nav-tabs-custom" id="myTabs">
                    <ul class="nav nav-tabs">
                        <li class="active" *ngIf="modalType==='1'"><a href="#tab_1" data-toggle="tab">询价明细表</a></li>
                        <li class="active" *ngIf="modalType==='2'"><a href="#tab_2" data-toggle="tab">申购明细表</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active row" id="tab_1" *ngIf="modalType==='1'">
                            <div class="table-scroll-content">
                                <table class="table table-bordered table-keep-line table-hover table-striped">
                                    <tr>
                                        <th>组合代码</th>
                                        <th>组合名称</th>
                                        <th>询价价格(元)</th>
                                        <th>询价数量(股)</th>
                                        <th>自愿锁定期(月)</th>
                                        <th>预计冻结金额(元)</th>
                                        <th>金额</th>
                                        <th>基金当前规模(元)</th>
                                        <th>是否参与询价</th>
                                        <th>日均市值(元)</th>
                                        <th>托管行</th>
                                        <th>席位号</th>
                                        <th>股东账户</th>
                                        <th>基金经理</th>
                                        <th>是否入围</th>
                                        <th *ngIf="canOperate(4,newStockModel.vcNewstockStatus)">操作</th>
                                    </tr>
                                    <tr *ngFor="let inquiry of inquiryList;" [class.highLight]="inquiry.enAveragevalueFlag == 0">
                                        <td>
                                            <!-- 组合代码 -->
                                            {{inquiry.vcFundCode}}
                                        </td>
                                        <td>
                                            <!-- 组合名称 -->
                                            {{inquiry.vcFundName}}
                                        </td>
                                        <td>
                                            <!-- 询价价格 -->
                                            {{inquiry.enPrice}}
                                        </td>
                                        <td *ngIf="!inquiry.isEdited">
                                            <!-- 询价数量 -->
                                            {{inquiry.lShare}}
                                        </td>
                                        <td *ngIf="inquiry.isEdited">
                                            <!-- 询价数量 -->
                                            <input type="text" class="form-control" name="lShareO3" [(ngModel)]="inquiry.lShareO3"/>
                                        </td>
                                        <td *ngIf="!inquiry.isEdited">
                                            <!-- 自愿锁定期 -->
                                            {{inquiry.lLockPeriod}}
                                        </td>
                                        <td *ngIf="inquiry.isEdited">
                                            <!-- 自愿锁定期 -->
                                            <input type="text" class="form-control" name="lLockPeriod" [(ngModel)]="inquiry.lLockPeriod"/>
                                        </td>
                                        <td>
                                            <!-- 预计冻结金额(万元)	 -->
                                            {{inquiry.enPredictMoney}}
                                        </td>
                                        <td>
                                            <!-- 金额 -->
                                            {{inquiry.enMoney}}
                                        </td>
                                        <td>
                                            <!-- 基金当前规模(万元) -->
                                            {{inquiry.enFundsacle}}
                                        </td>
                                        <td *ngIf="!inquiry.isEdited">
                                            <!-- 是否参与询价 -->
                                            {{inquiry.cIsJoin == '1' ? '参与' : '不参与'}}
                                        </td>
                                        <td *ngIf="inquiry.isEdited">
                                            <!-- 是否参与询价 -->
                                            <select name="cIsJoin" id="" [(ngModel)]="inquiry.cIsJoin">
                                                <option value=""></option>
                                                <option value="1">参与</option>
                                                <option value="0">不参与</option>
                                            </select>
                                        </td>
                                        <td>
                                            <!-- 日均市值(万元) -->
                                            {{inquiry.enAveragevalue}}
                                        </td>
                                        <td>
                                            <!-- 托管行 -->
                                            {{inquiry.vcBank}}
                                        </td>
                                        <td>
                                            <!-- 席位号 -->
                                            {{inquiry.vcTraceSeat}}
                                        </td>
                                        <td>
                                            <!-- 股东账号 -->
                                            {{inquiry.vcStockholderId}}
                                        </td>
                                        <td>
                                            <!-- 基金经理 -->
                                            {{inquiry.vcFundmrgName}}
                                        </td>
                                        <td>
                                            <!-- 是否入围 -->
                                            {{ inquiry.cIsrw == 1 ? '是' : '否' }}
                                        </td>
                                        <td *ngIf="canOperate(4,newStockModel.vcNewstockStatus)">
                                            <button *ngIf="!inquiry.isEdited " type="submit " class="btn btn-primary btn-xs " (click)="toEdit([inquiry])">编辑</button>
                                            <button *ngIf="inquiry.isEdited " type="submit " class="btn btn-primary btn-xs " (click)="cancelEdit([inquiry])">取消</button>
                                            <button *ngIf="inquiry.isEdited " type="submit " class="btn btn-warning btn-xs " (click)="saveInqurify([inquiry])">保存</button>
                                            <button *ngIf="inquiry.isEdited " type="submit " class="btn btn-danger btn-xs " (click)="deleteInqurify([inquiry])">删除</button>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="row nav-tabs-row-padding ">
                                <!-- 分页 Begin -->
                                <app-pagination #inquiryPag [currentPageNum]="inquiryPageInfo.currentPageNum " [pagesShow]=" " [totalPages]="inquiryPageInfo.totalPages " (pageChanged)="getInquiryList($event) "></app-pagination>
                                <!-- 分页 End-->
                            </div>
                        </div>
                        <div class="tab-pane active row" id="tab_2" *ngIf="modalType==='2'">
                            <div class="table-scroll-content">
                                <table class="table table-bordered table-keep-line table-hover table-striped">
                                    <tr>
                                        <th>指令状态</th>
                                        <th>组合代码</th>
                                        <th>组合名称</th>
                                        <th>申购价格（元）</th>
                                        <th>申购数量（股）</th>
                                        <th>申购金额（元）</th>
                                        <th>托管行</th>
                                        <th>席位号</th>
                                        <th>基金经理</th>
                                    </tr>
                                    <tr *ngFor="let inquiry of inquiryList;">
                                        <td>
                                            <!-- 指令状态 -->
                                            {{inquiry.vcFundCode}}
                                        </td>
                                        <td>
                                            <!-- 组合代码 -->
                                            {{inquiry.vcFundCode}}
                                        </td>
                                        <td>
                                            <!-- 组合名称 -->
                                            {{inquiry.vcFundName}}
                                        </td>
                                        <td>
                                            <!-- 申购价格（元） -->
                                            {{inquiry.enPriceO3}}
                                        </td>
                                        <td>
                                            <!-- 申购数量（股） -->
                                            {{inquiry.lShareO3}}
                                        </td>
                                        <td>
                                            <!-- 申购金额（元） -->
                                            {{inquiry.lShareO3}}
                                        </td>
                                        <td>
                                            <!-- 托管行 -->
                                            {{inquiry.vcBank}}
                                        </td>
                                        <td>
                                            <!-- 席位号 -->
                                            {{inquiry.vcTraceSeat}}
                                        </td>
                                        <td>
                                            <!-- 基金经理 -->
                                            {{inquiry.vcFundmrgName}}
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="row nav-tabs-row-padding ">
                                <!-- 分页 Begin -->
                                <app-pagination #inquiryPag [currentPageNum]="inquiryPageInfo.currentPageNum " [pagesShow]=" " [totalPages]="inquiryPageInfo.totalPages " (pageChanged)="getInquiryList($event) "></app-pagination>
                                <!-- 分页 End-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary pull-left" (click)="writingInquiryList()" *ngIf="modalType==='1'">录入询价明细</button>
                <button type="button" class="btn btn-default pull-left" (click)="closeModal()">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--发起询价End-->
<!-- 导入配售对象 Begin-->
<new-stock-purchase-file-upload-normal [modalConfig]="fileUploadModal " (close)="reflesh($event) "></new-stock-purchase-file-upload-normal>
<!-- 导入配售对象 End-->
<!-- 询价模板下载 Begin-->
<new-stock-purchase-inquiry-template [vcNewstockId]="newStockModel.vcNewstockId" (close)="reflesh($event)"></new-stock-purchase-inquiry-template>
<!-- 询价模板下载 End -->


<!-- 录入询价明细模态框开始 -->
<div class="modal fade" id="InquiryDetailModal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">录入询价明细</h4>
            </div>
            <div class="modal-body">
                <div class="form-group ext-from-item">
                    <h4 class="text-center">证券信息</h4>
                    <hr>
                    <div style="margin-left: 38%;">
                        <label>证券代码:<font style="color:red">{{newStockModel.vcNewstockId}}</font></label>
                        <label style="margin-left:10px;">证券名称:<font style="color:red">{{newStockModel.vcNewstockName}}</font></label>
                    </div>
                </div>
                <form class="form-inline">
                    <h4 class="text-center">组合信息</h4>
                    <hr>
                    <div class="form-group ext-from-item">
                        <label for="modalFundCode" class="col-sm-2">基金代码：</label>
                        <div class="col-sm-4">
                            <input style="cursor:pointer" type="text" class="form-control" name="modalFundCode" id="modalFundCode" readonly [(ngModel)]="InquiryDetailModalData.vcFundCode" (click)="openChooseFundModal(InquiryDetailModalData)">
                        </div>
                        <label for="modalFundName" class="col-sm-2">基金名称：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalFundName" id="modalFundName" readonly [(ngModel)]="InquiryDetailModalData.vcFundName">
                        </div>
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="modalEnPrice" class="col-sm-2">询价价格：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalEnPrice" id="modalEnPrice" readonly [(ngModel)]="InquiryDetailModalData.enPrice">
                        </div>
                        <label for="modalLShares" class="col-sm-2">询价数量：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalLShares" id="modalLShares" [(ngModel)]="InquiryDetailModalData.lShares">
                        </div>
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="modaLlLockperiod" class="col-sm-2 no-padding">自愿锁定期（月）：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalLLockperiod" id="modalLLockperiod" readonly [(ngModel)]="InquiryDetailModalData.lLockperiod">
                        </div>
                        <label for="modalEnMoney" class="col-sm-2">金额：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalEnMoney" id="modalEnMoney" readonly [(ngModel)]="InquiryDetailModalData.enMoney">
                        </div>
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="modalEnFundsacle" class="col-sm-2 no-padding">基金当前规模（元）：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalEnFundsacle" id="modalEnFundsacle" readonly [(ngModel)]="InquiryDetailModalData.enFundsacle">
                        </div>
                        <label for="modalCheckRight" class="col-sm-2">是否参与询价：</label>
                        <div class="col-sm-4">
                            <select class="form-control" name="modalCheckRight" id="modalCheckRight" disabled [(ngModel)]="InquiryDetailModalData.checkRight">
                                <option value="true">是</option>
                                <option value="false">否</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="modalEnAveragevalue" class="col-sm-2 no-padding">日均市值（元）：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalEnAveragevalue" id="modalEnAveragevalue" readonly [(ngModel)]="InquiryDetailModalData.enAveragevalue">
                        </div>
                        <label for="modalVcBank" class="col-sm-2">托管行：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalVcBank" id="modalVcBank" readonly [(ngModel)]="InquiryDetailModalData.vcBank">
                        </div>
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="modalVcTraceSeat" class="col-sm-2">席位号：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalVcTraceSeat" id="modalVcTraceSeat" readonly [(ngModel)]="InquiryDetailModalData.vcTraceSeat">
                        </div>
                        <label for="modalVcFundmrgName" class="col-sm-2">基金经理：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalVcFundmrgName" id="modalVcFundmrgName" readonly [(ngModel)]="InquiryDetailModalData.vcFundmrgName">
                        </div>
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="modalPaymentMethod" class="col-sm-2 no-padding">预计冻结金额（元）：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="modalFundName" id="modalFundName" readonly>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary col-sm-2 col-sm-offset-4" data-dismiss="modal" (click)="saveInquiryDetail()">保存</button>
                <button type="button" class="btn btn-default col-sm-2" data-dismiss="modal" (click)="closeSaveInquiryDetail()">关闭</button>
            </div>
        </div>
    </div>
</div>
<!-- 录入询价明细模态框结束 -->
<!-- 基金选择模态框开始 -->
<div class="modal fade" id="chooseFundModal" tabindex="-1" role="dialog" aria-labelledby="新增">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">基金列表</h4>
            </div>
            <div class="modal-body">
                <!-- 列表-->
                <div class="table-scroll-content">
                    <table class="table table-bordered table-keep-line table-hover table-striped pull-right align-center">
                        <tr>
                            <th>选择</th>
                            <th>基金代码</th>
                            <th>基金名称</th>
                        </tr>
                        <tr *ngFor="let item of modalFundData">
                            <td>
                                <!-- 选中 -->
                                <input type="radio" name="modalRadio" (click)="fundChooseChecked(item,$event)">
                            </td>
                            <td>
                                <!-- 基金代码 -->
                                {{item.vcFundCode}}
                            </td>
                            <td>
                                <!-- 基金名称 -->
                                {{item.vcFundName}}
                            </td>
                        </tr>
                    </table>
                </div>
                <!-- 列表 END-->
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary col-sm-2 col-sm-offset-4" (click)="confirmFund()">确定</button>
                <button type="button" class="btn btn-default col-sm-2" (click)="closeFundModal()">关闭</button>
            </div>
        </div>
    </div>
</div>
<!-- 基金选择模态框结束 -->